//
//  CALayer+Shadow.h
//  QNReuseTool
//
//  Created by rsh on 2019/10/15.
//  Copyright © 2019年 rsh. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>

@interface CALayer (Shadow)


/**
 添加阴影

 @param colorRef colorRef
 @param shadowOffset shadowOffset
 @param shadowRadius shadowRadius
 @param shadowOpacity shadowOpacity
 */
-(void)addShadowWithColor:(nullable CGColorRef)colorRef
                   offset:(CGSize)shadowOffset
                   radius:(CGFloat)shadowRadius
                  opacity:(CGFloat)shadowOpacity;

/**
 添加默认阴影
 */
-(void)addDefaultShadow;

-(void)addDefaultLightShadow;

-(void)removeShadow;


/**
 addShadowToEdge

 @param edge edge
 @param cColor cColor
 @param opacity opacity
 @param radius radius
 @param sizeOffset sizeOffset
 */
-(void)addShadowToEdge:(UIRectEdge)edge
                 color:(nonnull CGColorRef)cColor
               opacity:(CGFloat)opacity
          shadowRadius:(CGFloat)radius
          shadowOffset:(CGSize)sizeOffset;


/**
 addShadowToEdge

 @param edge edge
 */
-(void)addDefaultShadowToEdge:(UIRectEdge)edge;


/**
 addShadowToEdge

 @param edge edge descriptionedge
 @param cColor cColor
 */
-(void)addDefaultShadowToEdge:(UIRectEdge)edge
                        color:(nonnull CGColorRef)cColor;


/**
 addShadowToEdge

 @param edge edge
 @param opacity opacity
 */
-(void)addDefaultShadowToEdge:(UIRectEdge)edge
                      opacity:(CGFloat)opacity;


/**
 addShadowToEdge

 @param edge edge
 @param radius radius
 */
-(void)addDefaultShadowToEdge:(UIRectEdge)edge
                 shadowRadius:(CGFloat)radius;


/**
 addShadowToEdge

 @param edge edge
 @param sizeOffset sizeOffset
 */
-(void)addDefaultShadowToEdge:(UIRectEdge)edge
                 shadowOffset:(CGSize)sizeOffset;









@end
